//package com.ruyuan.eshop.construction.dao;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.ruyuan.eshop.common.dao.BaseDAO;
//import com.ruyuan.eshop.construction.builder.FullDraftData;
//import com.ruyuan.eshop.construction.converter.DraftConverter;
//import com.ruyuan.eshop.construction.domain.dto.DraftMainDTO;
//import com.ruyuan.eshop.construction.domain.entity.AuditInfoDO;
//import com.ruyuan.eshop.construction.domain.entity.DraftMainDO;
//import com.ruyuan.eshop.construction.mapper.DraftMainMapper;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Repository;
//
//import javax.annotation.Resource;
//
///**
// * 草稿主表
// *
// * @author zhonghuashishan
// */
//@Repository
//@Slf4j
//public class DraftMainDAO extends BaseDAO<DraftMainMapper, DraftMainDO> {
//
//    @Resource
//    private DraftConverter draftConverter;
//
//    public DraftMainDO getByTicketId(Long ticketId) {
//        LambdaQueryWrapper<DraftMainDO> queryWrapper = Wrappers.lambdaQuery();
//        queryWrapper.eq(DraftMainDO::getTicketId, ticketId);
//        return this.getOne(queryWrapper);
//    }
//    public DraftMainDTO getDTOByTicketId(Long ticketId) {
//        return draftConverter.convertDTO(getByTicketId(ticketId));
//    }
//
//    public void saveDraftMain(FullDraftData fullDraftData, AuditInfoDO auditInfoDO) {
//        DraftMainDO draftMainDO = fullDraftData.getDraftMainDO();
//        draftMainDO.setTicketId(auditInfoDO.getId());
//        this.save(draftMainDO);
//    }
//}
